<div id="cat-category-boxes">
<?php foreach($this->categories AS $i=>$category): ?>
	<?php $url = $this->sherpaUrl()->category($category->getId()) ?>
	<div class="cat-category-box-wrapper <?php echo (($i+1)%3 == 0) ? 'last' : '' ?>">
		<div class="cat-category-box">
			<div class="name"><a href="<?php echo $url ?>"><?php echo $this->escape($category->getName()) ?></a></div>
			<?php $image = $category->getOverviewImage() ?>
			<?php if($image->isFile()): ?>
				<div class="image"><a href="<?php echo $url ?>"><?php echo $image->getHtml() ?></a></div>
			<?php endif; ?>
		</div>
	</div>
<?php endforeach; ?>
</div>